import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import javax.swing.JPanel;
import java.awt.Panel;


public class OregonTrailApp {

	static Party party;
	static SettingManager settingManager;
	private JFrame frame;
	private ConfigurationPanel configPanel;
	private StartPanel2 startPanel2;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					OregonTrailApp window = new OregonTrailApp();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
		
	}

	/**
	 * Create the application.
	 */
	public OregonTrailApp() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		settingManager = new SettingManager();
		
		frame = new JFrame();
		frame.setBounds(100, 100, 450, 300);
		frame.setResizable(false);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(new CardLayout(0, 0));
		configPanel = new ConfigurationPanel();
		startPanel2 = new StartPanel2(this);

		frame.getContentPane().add(startPanel2);
		frame.getContentPane().add(configPanel);
	
		
	}
	
	protected void showConfigScreen(){
		
		frame.remove(startPanel2);
		frame.add(configPanel);
		frame.pack();
		frame.repaint(); 

	}
	
	protected void showLoadScreen(){
		System.out.println("Load Screen in the works. :D");
	}
	
	protected static void testing(){
		System.out.println(settingManager.getPace());
		System.out.println(settingManager.getRations());
		System.out.println(party.getPlayer().getMoney());
		System.out.println(party.getParty().get(2).getName());
	}
}
